<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('批量设置人员任务数量')" />
</head>
<body>
    <div class="main-content">
        <form class="form-horizontal" id="form-manage-setUp">
            <input name="id"  th:value="*{ids}" type="hidden">
                <div  class="row" >
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">任务数量：</label>
                                <div class="col-sm-8">
                                    <input name="taskLimit" class="form-control" placeholder="请输入数字" type="number" required >
                                </div>
                            </div>
                        </div>
                </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/data";

        function submitHandler() {
            var ids=$('#form-manage-setUp  input[name="id"]').val();
            var taskLimit=$('#form-manage-setUp  input[name="taskLimit"]').val();
            //var data = { "ids": ids };
            if ($.validate.form()) {
                $.operate.get(prefix + "/setUpTaskCounts/"+ids+"/"+taskLimit,function (result) {
                    $.modal.close();
                    var parent = activeWindow();
                    if(result.code==0){
                        parent.$.modal.msgSuccess(result.msg);
                        parent.$.table.refresh();
                    }else{
                        parent.$.modal.msgError(result.msg);
                    }
                });
            }
        }
    </script>
</body>
</html>